package com.cslg.yougou.front.service;
import com.cslg.yougou.front.entity.YougouMember;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cslg.yougou.front.pojo.Result;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zyw
 * @since 2020-11-04
 */
public interface YougouMemberService extends IService<YougouMember> {
    /**
     * 微信小程序登录
     * @param code
     * @param encryptedData
     * @param iv
     * @param request
     * @return
     */
    Result login(String code, String encryptedData, String iv, HttpServletRequest request);

    /**
     * 解密用户数据
     * @param encryptedData
     * @param session_key
     * @param iv
     * @param charset
     * @return
     */
    YougouMember deCodeUserInfo(String encryptedData, String session_key, String iv, String charset) throws Exception;
}
